package com.nengchuan.kbms.dfs.entity.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.nengchuan.kbms.dfs.annotation.Relation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * <p>
 * 用户文件夹 DTO
 * </p>
 *
 * @author abe
 * @since 2020-03-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "UserFolder对象", description = "用户文件夹")
@ToString
public class UserFolderDTO {

    @ApiModelProperty(value = "主键", position = 10)
    private Long id;

    @NotNull(message = "父文件夹id不能为空")
    @ApiModelProperty(value = "父文件夹id", position = 15)
    @Relation
    private Long parentId;

    @NotEmpty(message = "文件夹名称不能为空")
    @Size(max = 255,message = "文件夹名称不能长于255个字符")
    @ApiModelProperty(value = "文件夹名称", position = 20)
    @Relation
    private String folderName;

    @NotNull(message = "文件夹所属用户id不为空")
    @ApiModelProperty(value = "文件夹所属用户id", hidden = true)
    @JsonIgnore
    @Relation
    private Long userId;

}
